<div class="view-header">
    <!-- 查询 -->
    <div ng-show="!check_show">
        <div class="search-shop">
            <i class="fa fa-home"></i>
            <shop-picker class="from-control"
                         shop="search_params.shop"></shop-picker>
        </div>

        <div class="search-date">
            <i class="fa fa-calendar search-date-i"></i>
            <datetimepicker class="search-date-start"
                            min-view="2"
                            end-date="search_params.date_end"
                            ng-model="search_params.date_start"></datetimepicker>

        </div>
        <div class="search-date">
            <i class="fa fa-calendar search-date-i"></i>
            <datetimepicker class="search-date-end"
                            min-view="2"
                            start-date="search_params.date_start"
                            ng-model="search_params.date_end"></datetimepicker>
        </div>
        <div class="view-header-left">
            <div class="view-header-item no-widen"
                 ng-show="!place_order_open&&!add_cover"
                 ng-click="refresh()" title="查询">
                <i class="fa fa-search"></i>
            </div>
        </div>
    </div>

    <div class="view-header-left" ng-show='check_show'>


        <div class="view-header-item no-widen color-close above-cover"
             ng-click='check_show = !check_show; readonly = false;receipt_invalid = false;' title="关闭"
             ng-show='check_show && !insurance_cover'>
            <i class="fa fa-close"></i>
        </div>


        <div class="view-header-item color-check above-cover" ng-click='check_save()' title="保存财务结算" ng-show="forms.data.finance_status == 1">
            <i class="fa fa-save"></i> 保存结算
        </div>
        <div class="view-header-item color-save above-cover" ng-click='forms.receipt_form.$valid?check_submit():{}' title="财务结算">
            <i class="fa fa-check" ng-show="forms.receipt_form.$valid"></i>
            <i class="fa fa-ban" ng-show="forms.receipt_form.$invalid"></i>
            {{forms.receipt_form.$invalid?'完善表单!':'确认结算'}}
        </div>
    </div>
</div>
<div class="view-content ">
    <div ag-grid="grid" class="ag-material" style="height :100%"></div>
</div>

<div class="data-overlay" ng-show='check_show'>
    <div class="overlay-container" ng-init="form = {}">
        <div class="overlay-header">财务结算</div>
        <form-receipt ng-model="forms.data" form="forms.receipt_form" readonly="'finance'"></form-receipt>
<!--         <div class="invalid-overlay" ng-show="readonly">
            <div class="invalid-content" ng-show="forms.data.status == 9">已作废</div>
        </div> -->
    </div>
</div>
